package android.test;

import java.util.ArrayList;

import Entities.Team;
import Entities.User;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends Activity {
	private Team testTeam;
	private User testUser;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    
    public void goToTeamView(View view){
    	Intent teamPage = new Intent(getApplicationContext(),TeamOverviewActivity.class);
    	startActivity(teamPage);
    	return;
    }
    public void goToMapOverview(View view){
    	Intent mapPage = new Intent(getApplicationContext(),MapOverviewActivity.class);
    	startActivity(mapPage);
    	return;
    }
    public void goToLoginPage(View view){
    	Intent LoginPage = new Intent(getApplicationContext(),LoginActivity.class);
    	startActivity(LoginPage);
    	return;
    }
    public void goToGameList(View view){
    	Intent gameListPage = new Intent(getApplicationContext(),GameListActivity.class);
    	startActivity(gameListPage);
    	return;
    }
    
    public void TestData(){
    	//makes a simple predefined User for testing the login of existing User
    	testUser = new User();
    	testUser.setID(0);
    	testUser.setUsername("testUser");
    	testUser.setPassword("test");
    	
    	
    	//makes predefined team with some simple test data to test the screen
    	testTeam= new Team();
    	testTeam.setName("Testing team");
    	testTeam.setPassword("password");
    	testTeam.setUsers(new ArrayList<User>());
    }
}
